package com.ocm.tourism.core.dao.jpa;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.ocm.tourism.core.dao.FestivalDao;
import com.ocm.tourism.core.domain.Festival;

@Repository("festivalDao")
public class JpaFestivalDao extends JpaGenericDao<Festival> implements FestivalDao {


   public JpaFestivalDao() {
      this.setClazz(Festival.class);
   }

   public List<Festival> findAll() {
      return entityManager().createQuery("SELECT o FROM Festival o order by o.address", Festival.class).getResultList();
   }
}
